class TFont
{
	unsigned int width,height,fx,fy,kerning;
	Texture *tex;
	int chs[256];
	char *internalname;
	char *texturename;
	unsigned int drawwed;
	unsigned int staticdrawwed;
	std::map<std::string,unsigned int> *static_texs;
	float sttcu,sttcv;
	float stw,sth;
	float texsize;

	int exists;
public:

	int WordWidth(const char* text, int position);
	int IsSpace(char ch);

	TFont(const char *name);
	~TFont();
	void Text(const char *text,int x,int y,int centerX,int centerY);
	void Text(int value,int x,int y,int centerX,int centerY);
	void TextRect(const char* text,int x,int y,int width,int height,int start);

	void StaticDraw(const char *text,int x,int y,int cx,int cy);
	void AddStaticText(const char *text);
	void DeleteStaticText(const char *text);
	void ClearStaticTexts();
	void StartDraw();
	void EndDraw();
	void StartStaticDraw(const char *text);
	void EndStaticDraw();
	unsigned int GetWidth(const char *text);
	unsigned int GetHeight();
	Texture* GetTex();
	void Smooth(int value);

	void Bind();
};

namespace TFontSharedVariables
{
TFont *CurrentFont=0;
TFont *DefaultFont=0;
unsigned char currentblend=0;
}